package com.ahy231.mapper;

import com.ahy231.dto.GetUsers;
import com.ahy231.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author ahy231
 * @date 2021/8/1 20:35
 * @description
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("SELECT user_id, username FROM `user` WHERE username LIKE CONCAT('%',#{username},'%')")
    List<GetUsers> queryUsers(String username);
}
